The present invention relates to a semiconductor device used as a switching element. As disclosed in Japanese Unexamined Patent Publication No. 2002-299625, a switching element incorporating a Schottky diode in a part of a MOSFET formed on a silicon carbide substrate is known. This switching element is configured to function as a bi-directional conductive element having small switching losses. Specifically, the MOSFET functions as the switching element in the forward conduction mode, while the Schottky diode functions as a majority-carrier passive element in the reverse conduction mode or in so-called the freewheeling action.